from selenium import webdriver
from time import sleep

from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("http://www.baidu.com")
driver.maximize_window()
# 定位搜索框【id方式】，然后输入值，点击按钮进行搜索
driver.find_element(By.ID, "chat-textarea").send_keys("实拍北京冰雹:像天空倒冰块")
driver.find_element(By.ID, "chat-submit-button").click()
sleep(4)
# 通过class进行定位，然后进行点击
driver.find_element(By.CLASS_NAME, "cosc-title-slot").click()
sleep(3)
driver.quit()
"""
    这是我的代码注释
"""